﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using SystemCenterSoa.PoModel.SystemManager;
using SystemCenterSoa.Service.SystemManager;

namespace SystemCenterSoa.ApiProject.Area.SystemManager
{
    public class PerformanceController : SystemManagerBaseController
    {
        private PerformanceService _performanceService;
        public PerformanceController(PerformanceService performanceService)
        {
            _performanceService = performanceService;
        }

        //添加考核任务
        [HttpPost]
        public IActionResult AddTheAssessmentTask(TheAssessmentTask theAssessmentTask)
        {
            return Ok(_performanceService.AddTheAssessmentTask(theAssessmentTask));
        }
        //删除考核任务
        [HttpPost]
        public IActionResult DelTheAssessmentTask(int id)
        {
            return Ok(_performanceService.DelTheAssessmentTask(id));
        }
        //显示考核统计
        [HttpGet]
        public IActionResult ShowAssessmentTotal()
        {
            return Ok(_performanceService.ShowAssessmentTotal());
        }
        //显示考核任务
        [HttpGet]
        public IActionResult ShowTheAssessmentTask()
        {
            return Ok(_performanceService.ShowTheAssessmentTask());
        }
        [HttpPost]
        //归档
        public IActionResult UpdateGuiDang(int id)
        {
            return Ok(_performanceService.UpdateGuiDang(id));
        }
        //修改考核任务
        [HttpPost]
        public IActionResult UpdateTheAssessmentTask(TheAssessmentTask theAssessmentTask)
        {
            return Ok(_performanceService.UpdateTheAssessmentTask(theAssessmentTask));
        }

    }
}
